package com.lahuan;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
import com.baomidou.mybatisplus.core.incrementer.IdentifierGenerator;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.lahuan.demo.entity.Order;
import com.lahuan.demo.service.OrderService;
import com.lahuan.demo.service.impl.OrderServiceImpl;
import lombok.extern.slf4j.Slf4j;
import org.apache.kafka.clients.consumer.KafkaConsumer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.ApplicationArguments;
import org.springframework.boot.ApplicationRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ConfigurableApplicationContext;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

import javax.sql.DataSource;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.UUID;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

/**
 * @author linfy
 */
@Slf4j
@EnableSwagger2
@SpringBootApplication
public class BaseSpringBootApplication  {


    public static void main(String[] args) {
        ConfigurableApplicationContext ctx = SpringApplication.run(BaseSpringBootApplication.class, args);
        DataSource dataSource = ctx.getBean(DataSource.class);
        log.info("当前使用的数据源:" + dataSource.getClass());

//        String[] names = ctx.getBeanDefinitionNames();
//        Arrays.stream(names).forEach(System.out::println);
    }

}
